High Efficiency Video Coding (HEVC) is a new coding standard that has been developed in recent years. In the High Efficiency Video Coding (HEVC) system, the fixed-size macroblock of H.264/AVC is replaced by a flexible block, named coding unit (CU). In recent HEVC development, palette-based coding is being used for screen content coding (SCC). The syntaxes for palette coding mainly consist of two parts. One is signalling palette table and the other is signalling the index map of the block (i.e., a CU) which represents the information of the block coded. For the index map, number of indices, last run_type flag and grouped indices are signalled. After signalling index information, a pair of run type and number of run is repeatedly signalled. At last, group of escape values is signalled, if necessary.
In HEVC document JCTVC-T1005 (Joshi, et al., HEVC Screen Content Coding Draft Text 3, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 20th Meeting: Geneva, CH, 10-18 Feb. 2015, Document: JCTVC-T1005), the palette indices are grouped and signalled in the front of the coded data for a corresponding block (i.e., before palette_run_mode and palette_run syntax elements in a bitstream for the current block). On the other hand, the escape pixels are coded at the end of the coded data for the corresponding block. The syntax elements, palette_run_mode and palette_run are coded between palette indices and escape pixels. FIG. 1 illustrates an exemplary flowchart for index map syntax signalling according to JCTVC-T1005. The number of indices (110), last run_type flag (130) and grouped indices (120) are signalled. After signalling index information, a pair of run type (140) and number of runs (150) is repeatedly signalled. At last, a group of escape values (160) is signalled, if necessary.
In JCTVC-T1005, the last_palette_run_type_flag uses its own context to code. The context table is shown in Table 1, where initial values (i.e., initValue) for palette_run_type_flag and last_palette_run_type_flag are specified.
TABLE 1ctxIdx ofpalette_run_type_flag andInitializationlast_palette_run_type_flagvariable012initValue154154154
Furthermore, palette_run_type and last_palette_run_type, each having one context (ctxIdx=0), are specified in the following table.
TABLE 2binIdxSyntax element01234>=5. . .. . .. . .. . .. . .. . .. . .palette_transpose_flag0nanananananum_palette_indices_idcbypassbypassbypassbypassbypassbypasslast_palette_run_type_flag0nananananapalette_run_type_flag0nananananapalette_index_idcbypassbypassbypassbypassbypassbypass
The syntaxes for palette coding mainly consist of two parts. One is signalling palette table itself and the other is signalling the index map of the block, which represents the information of the block coded. For the index map, number of indices, last run type flag and grouped indices are signalled. After signalling index information, a pair of run type and number of run is repeatedly signalled. At last, a group of escape values is signalled, if necessary. The palette index map syntax signalling in SCM4.0 can be depicted as below:
In JCTVC-T1005, the difference between NumPaletteIndices and MaxPaletteIndex is signalled, where MaxPaletteIndex specifies the maximum possible value for a palette index of the current coding unit. The value of MaxPaletteIndex is set equal to CurrentPaletteSize−1+palette_escape_val_present_flag. The corresponding syntax element for the number of indices is num_palette_indices_idc. The corresponding syntax is as follows: num_palette_indices_idc is an indication of the number of palette indices signalled for the current block.
When num_palette_indices_idc is not present, it is inferred to be equal to 0. The variable NumPaletteIndices specifies the number of palette indices signalled for the current block and is derived as shown in the following table.
TABLE 3if( num_palette_indices_idc >= ( MaxPaletteIndex − 1) * 32 )NumPaletteIndices = num_palette_indices_idc + 1else if(num_palette_indices_idc % 32 = = 31)NumPaletteIndices = MaxPaletteIndex −(num_palette_indices_idc + 1 ) / 32 −1)elseNumPaletteIndices = (num_palette_indices_idc / 32 ) * 31 ) +(num_palette_indices_idc % 32) + MaxPaletteIndex
In JCTVC-T1005, it also discloses a method to signal the palette table of the current block based on a palette predictor. FIG. 2 illustrates an example of the process of reconstructing the palette for the current block based on a palette predictor as specified in JCTVC-T1005. Some entries of the palette predictor 220 are reused by the palette of the current block 210. The correspondences between the reused entries of the palette predictor 220 and reused entries of the palette of the current block are indicated by arrows 215. Palette reuse flags 230 are used to identify the entries of the palette predictor that are reused. If the palette reuse flag is equal to 1, it indicates that the corresponding entry is reused. If the palette reuse flag is equal to 0, it indicates that the corresponding entry is not reused. The palette reuse flags are coded by run-length coding, where the runs of “1”s are coded as syntax element palette_predictor_run.